<?php
namespace app\adminxcx\controller;
use \think\Controller;
use app\admin\model\User as UserModel;
use app\admin\model\Relation as RelationModel;


class Relation extends Controller
{

    protected $UserModel;
    protected $RelationModel;

    public function __construct()
    {
        if(!session('uid')){
            $this->redirect('index/index');
        }
        $this->UserModel = new UserModel();
        $this->RelationModel = new RelationModel();
    }

    public function index($cid=0)
    {
        
        
    }


    public function upload(){
        if(!session('uid')){
            return 0;
        }
        $fileinfo = $_FILES['file'];
        $file = request()->file('file');
        $info = $file-> move(env('ROOT_PATH').'public/uploads');
        $image = str_replace('\\','/',$info->getSaveName()); 
        print_r($image);
    }
    

 
}
